package com.lorizz.picpub.web;

public class WebException extends RuntimeException {

	private static final long serialVersionUID = -5449367617910342088L;
	private Code code;
	
	public static enum Code {
		OTHERS(0),
		ALBUM_NOT_UPLOADALBE(1);
		
		private int code;
		
		Code(int code) {
			this.code = code;
		}
		
		public int getCode() {
			return code;
		}
	}
	
	public WebException(Code code) {
		this.code = code;
	}
	
	public WebException(Code code, Throwable error) {
		super(error);
		this.code = code;
	}
	
	public int getCode() {
		return this.code.getCode();
	}

}
